package com.li.sssp.cp.model;

import java.util.Date;
import java.util.List;

import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

public class Game {

	private Integer id;
	private Integer game_id;
	private String game_info;
	private String league;
	private Integer leagueNum;
	private Date beginDate;
	private Date endtime;
	private HomeTeam homeTeam;
	private GuestTeam guestTeam;
	private List<SP> sps;
	private ForecastResult forecastResult;
	private List<E> Es;

	public List<E> getEs() {
		return Es;
	}

	public void setEs(List<E> es) {
		Es = es;
	}

	public ForecastResult getForecastResult() {
		return forecastResult;
	}

	public void setForecastResult(ForecastResult forecastResult) {
		this.forecastResult = forecastResult;
	}

	public Date getEndtime() {
		return endtime;
	}

	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}

	public String getGame_info() {
		return game_info;
	}

	public void setGame_info(String game_info) {
		this.game_info = game_info;
	}

	public Integer getId() {
		return id;
	}

	public Game() {
		super();
		// TODO Auto-generated constructor stub
	}

	public GuestTeam getGuestTeam() {
		return guestTeam;
	}

	public void setGuestTeam(GuestTeam guestTeam) {
		this.guestTeam = guestTeam;
	}

	@OneToMany()
	@JoinColumn(name = "SP_Id")
	public List<SP> getSps() {
		return sps;
	}

	public void setSps(List<SP> sps) {
		this.sps = sps;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getGame_id() {
		return game_id;
	}

	public void setGame_id(Integer game_id) {
		this.game_id = game_id;
	}

	public String getLeague() {
		return league;
	}

	public void setLeague(String league) {
		this.league = league;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	@OneToOne()
	@JoinColumn(name = "Home_id")
	public HomeTeam getHomeTeam() {
		return homeTeam;
	}

	public void setHomeTeam(HomeTeam homeTeam) {
		this.homeTeam = homeTeam;
	}

	public Integer getLeagueNum() {
		return leagueNum;
	}

	public void setLeagueNum(Integer leagueNum) {
		this.leagueNum = leagueNum;
	}

	@Override
	public String toString() {
		return "Game [id=" + id + ", game_id=" + game_id + ", game_info=" + game_info + ", league=" + league
				+ ", leagueNum=" + leagueNum + ", beginDate=" + beginDate + ", endtime=" + endtime + ", homeTeam="
				+ homeTeam + ", guestTeam=" + guestTeam + ", sps=" + sps + ", forecastResult=" + forecastResult
				+ ", Es=" + Es + "]";
	}

	public Game(Integer id, Integer game_id, String game_info, String league, Integer leagueNum, Date beginDate,
			Date endtime, HomeTeam homeTeam, GuestTeam guestTeam, List<SP> sps, ForecastResult forecastResult,
			List<E> es) {
		super();
		this.id = id;
		this.game_id = game_id;
		this.game_info = game_info;
		this.league = league;
		this.leagueNum = leagueNum;
		this.beginDate = beginDate;
		this.endtime = endtime;
		this.homeTeam = homeTeam;
		this.guestTeam = guestTeam;
		this.sps = sps;
		this.forecastResult = forecastResult;
		Es = es;
	}

}
